import axios from "@/api/http";
import qs from 'qs'
const search =  (params: any = {}) => {
    return axios.post('/file/search', params)
}
const remove =  (params: any = {}) => {
    return axios.post('/file/remove',qs.stringify(params) )
}
const rename =  (params: any = {}) => {
    return axios.post('/file/rename', params)
}
const download =  (params: any = {}) => {
    return axios({
        method: 'get',
        url: '/file/download',
        params: params,
        responseType: 'blob'
    })
}


export default {
    search,
    remove,
    rename,
    download
}